package homework.exp03;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class A {
    static Scanner cin = null;

    static {
        try {
            cin = new Scanner(new FileReader(new File("A.in")));
        } catch (IOException e) {
            cin = new Scanner(System.in);
        }
    }

    public static void main(String[] args) {
        System.out.println(String.format("%.2f", foo()));
    }

    private static double foo() {
        String str = cin.next();
        try {
            return Double.parseDouble(str);
        } catch (Exception e) {
            double a = foo();
            double b = foo();
            switch (str.charAt(0)) {
                case '+':
                    return a + b;
                case '-':
                    return a - b;
                case '*':
                    return a * b;
                case '/':
                    return a / b;
            }
            return 0;
        }
    }
}